xml.instruct!

xml.rss "version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/" do
  xml.channel do

    xml.title       "#{Settings.short_title} Announcements"
    xml.link        url_for :only_path => false, :controller => 'posts'
    xml.pubDate     CGI.rfc1123_date @announcements.first.updated_at if @announcements.any?
    xml.description "#{Settings.short_title} Announcements"

    @announcements.each do |announcement|
      xml.item do
        xml.title       announcement.title
        xml.link        url_for :only_path => false, :controller => 'announcements', :action => 'show', :id => announcement
        xml.description announcement.body
        xml.pubDate     CGI.rfc1123_date announcement.updated_at
        xml.guid        url_for :only_path => false, :controller => 'announcements', :action => 'show', :id => announcement
        xml.author      "#{announcement.author.email} (#{announcement.author.name})"
      end
    end

  end
end